import router from './router'
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'

router.beforeEach(async (to: any, from: any, next: any): Promise<any> => {
    NProgress.start()
    window.scrollTo(0, 0);
    document.body.scrollTop = 0
    document.documentElement.scrollTop = 0
    next();
})
router.afterEach(() => {
    NProgress.done()
}) 